package cn.example.zjgsu.dao;

import cn.example.zjgsu.pojo.Comment;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface CommentMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Comment record);

    Comment selectByPrimaryKey(Integer id);

    List<Comment> selectAll();

    int updateByPrimaryKey(Comment record);

    List<Comment> selectCommentsByShopId(Integer shopid);

    List<Comment> selectCommentsByFoodRecordId(Integer foodrecordid);

    int updatePraisenumberById(Integer id);

    int getCommentNumberOfFD(Integer foodrecordid);
}